package com.study.app;

import com.study.bean.BookService;
import com.study.bean.impl.BookServiceImpl3;
import com.study.config.SpringConfig7;
import com.study.config.SpringConfig8;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 * @desc:
 * @author: panxiyi
 * @date: 2023/5/15 9:58 上午
 */
public class App8 {
    public static void main(String[] args) {
        AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext(SpringConfig8.class);
        ctx.registerBean("bookService", BookServiceImpl3.class);
        BookService bookService = ctx.getBean("bookService", BookService.class);
        bookService.check();
    }
}
